package ipad.asia.service.punish;

import ipad.asia.entity.PunishEnterprise;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.time.LocalDateTime;
import java.util.List;

@Component
@FeignClient(value = "PROVIDER-ADMIN")
public interface PunishEnterpriseFeign {
    /**
     * 获取所有的被投诉商家
     * @return
     */
    @RequestMapping("/admin/complaintEnterprise/getAll")
     List<PunishEnterprise> findAll();

    @RequestMapping("/admin/complaintEnterprise/getById")
     PunishEnterprise findById(@RequestParam(value = "id",required = false) int id);
    /**
     * 查看当前商铺的所有投诉
     * @param
     * @return
     */
    @RequestMapping("/admin/complaintEnterprise/getByShopId")
     List<PunishEnterprise> findByShopId(@RequestParam(value = "shopId",required = false) int shopId);
    /**
     * 对被投诉的人做出处罚，不要轻易做出处罚，处罚一次，警告一次，第二次严重警告，第三次封号
     * @param
     */
    @RequestMapping("/admin/waringEnterprise")
     void waring(@RequestParam(value = "shopId",required = true) int shopId);
    /**
     * 投诉商家
     * @param
     * @param reason
     * @param proof
     * @param reportEmail
     * @param date
     */
    @RequestMapping("/complaint/enterprise")
     void complaintConsumer(@RequestParam(value = "shopId",required = false)int shopId,
                                  @RequestParam(value = "shopName",required = false)String shopName,
                                  @RequestParam(value = "reason",required = false)String reason,
                                  @RequestParam(value = "proof",required = false)String proof,
                                  @RequestParam(value = "reportEmail",required = false)String reportEmail,
                                  @RequestParam(value = "date",required = false)LocalDateTime date);

    @RequestMapping("/shop/update")
    void update(@RequestParam(value = "statues",required = false) int statues,
                @RequestParam(value = "serious",required = false)int serious,
                @RequestParam(value = "result",required = false)String result,
                @RequestParam(value = "id",required = false)int id);

}
